Skip to content

Add direct unit tests for DebuggerEndpointHelper#2712

Open
ConnorQi01 wants to merge 1 commit into
masterfrom
dev/v-peq/issue-2705-debugger-endpoint-tests
Open

Add direct unit tests for DebuggerEndpointHelper#2712
ConnorQi01 wants to merge 1 commit into
masterfrom
dev/v-peq/issue-2705-debugger-endpoint-tests

Conversation

@ConnorQi01

Copy link
Copy Markdown
Collaborator

Summary

Add a dedicated unit test file for DebuggerEndpointHelper to cover endpoint selection, fallback logic, and debugger type detection with stubbed HTTP/HTTPS/DNS dependencies.

Proposed Changes

  • Add test/cdp-proxy/debuggerEndpointHelper.test.ts with direct unit tests
  • Cover getWSEndpoint returning /json/version webSocketDebuggerUrl when present
  • Cover fallback to /json/list including Hermes improved Chrome reload target selection
  • Cover fallback to default Metro endpoint when no targets found
  • Cover getDebuggerType returning expo vs react-native
  • Cover retry/cancellation behavior in retryGetWSEndpoint

Test Plan

  • npm test passes with the new test file included

Closes #2705

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Add direct unit tests for DebuggerEndpointHelper

1 participant